-
Notifications
You must be signed in to change notification settings - Fork 202
Fix context usage in shim package #3224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix context usage in shim package #3224
Conversation
r4victor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cancelling some operations like "umount" can be problematic. Not sure it's an improvement.
Signed-off-by: Matías Insaurralde <[email protected]>
d3b0e0a to
15d30a9
Compare
Prevents umount command cancellation which could lead to data corruption and filesystem inconsistencies. Addresses review feedback about cancelling critical filesystem operations. Signed-off-by: Matías Insaurralde <[email protected]>
Makes sense - I've refactored the PR a bit, still passing context to exec.CommandContext(context.TODO(), "umount", "-qf", mountPoint)I've inspected the other operations (there should be no impact if cancelled, they return errors and/or can be retried):
|
| continue | ||
| } | ||
| cmd = exec.Command("umount", "-qf", mountPoint) | ||
| cmd = exec.CommandContext(context.TODO(), "umount", "-qf", mountPoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's the benefit of CommandContext(context.TODO()?
|
This PR is stale because it has been open for 14 days with no activity. |
Same as #3223 but for the shim package.
Had to update the
Backendinterface to take the context 👍